/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author adama
 */
@Embeddable
public class SaisonPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idSaison")
    private int idSaison;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idSerie")
    private int idSerie;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idVideo")
    private int idVideo;

    public SaisonPK() {
    }

    public SaisonPK(int idSaison, int idSerie, int idVideo) {
        this.idSaison = idSaison;
        this.idSerie = idSerie;
        this.idVideo = idVideo;
    }

    public int getIdSaison() {
        return idSaison;
    }

    public void setIdSaison(int idSaison) {
        this.idSaison = idSaison;
    }

    public int getIdSerie() {
        return idSerie;
    }

    public void setIdSerie(int idSerie) {
        this.idSerie = idSerie;
    }

    public int getIdVideo() {
        return idVideo;
    }

    public void setIdVideo(int idVideo) {
        this.idVideo = idVideo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idSaison;
        hash += (int) idSerie;
        hash += (int) idVideo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SaisonPK)) {
            return false;
        }
        SaisonPK other = (SaisonPK) object;
        if (this.idSaison != other.idSaison) {
            return false;
        }
        if (this.idSerie != other.idSerie) {
            return false;
        }
        if (this.idVideo != other.idVideo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.SaisonPK[ idSaison=" + idSaison + ", idSerie=" + idSerie + ", idVideo=" + idVideo + " ]";
    }
    
}
